package org.tuestudent.grouppa;

import junit.framework.TestCase;


public class LoginViewControllerTest extends TestCase {

    private LoginViewController instance;

    public void setUp() throws Exception {
        Main.initializeApp();
        instance =LoginViewController.getInstance();
    }
    
    public void testCreateAccount() throws InterruptedException
    {
        String email = "monter@dachowy";
        String login = "testManiek2";
        String password = "vader";
        instance.createAccount(login,password,email);
        Main.getConnection().waitForThreads(600);
        loginTest(email,password);
    }
    
    public void loginTest(String email, String password) throws InterruptedException
    {
        instance.login(email, password);
        Main.getConnection().waitForThreads(600);
        resetPasswordTest(email);
    }
    public void resetPasswordTest(String email) throws InterruptedException
    {
        instance.resetPassword(email);
        Main.getConnection().waitForThreads(600);
        
    }
}
